Abstraction is the process of hiding complexity by creating a "vocabulary" that operates at a higher conceptual level than raw computer operations. It allows us to move from imperative commands ("How to do it") to declarative intent ("What to do").
1. The Ladder of Abstraction
As we climb the ladder, we gain human expressiveness but pay an "Abstraction Tax": every layer adds distance between code and hardware, requiring more machine cycles to translate concepts back into primitive actions.
2. Parameterized Logic
By adding a step argument to our range function, we evolve a static tool into a flexible engine. We can handle varied directions (positive or negative increments) without rewriting the core algorithm: range(5, 2, -1).
3. The Result
Instead of manual loop counters, we use console.log(sum(range(1, 10)));. This hides the "plumbing" inside reusable units.